﻿using System;
using System.Collections.Generic;
using System.DirectoryServices;
using System.DirectoryServices.AccountManagement;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace AdTest.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            return View(UserPrincipal.Current);
        }

        public ActionResult Account()
        {
            return View(UserPrincipal.Current);
        }

        public ActionResult Ldap()
        {
            return View(UserPrincipal.Current.GetUnderlyingObject() as DirectoryEntry);
        }

        public ActionResult Groups()
        {
            return View(UserPrincipal.Current.GetGroups());
        }

        public ActionResult About()
        {
            return View();
        }
    }
}
